import request from '@/utils/request'

// 查询直系亲属备档列表
export function listRelative(query) {
  return request({
    url: '/document/relative/list',
    method: 'get',
    params: query
  })
}

// 查询直系亲属备档详细
export function getRelative(relativeId) {
  return request({
    url: '/document/relative/' + relativeId,
    method: 'get'
  })
}

// 新增直系亲属备档
export function addRelative(data) {
  return request({
    url: '/document/relative',
    method: 'post',
    data: data
  })
}

// 修改直系亲属备档
export function updateRelative(data) {
  return request({
    url: '/document/relative',
    method: 'put',
    data: data
  })
}

// 删除直系亲属备档
export function delRelative(relativeId) {
  return request({
    url: '/document/relative/' + relativeId,
    method: 'delete'
  })
}
